package com.zlx.rulemk.marketing.utils;

import org.apache.commons.lang3.RandomUtils;

/**
 * @Author: zhanglingxing
 * @CreateTime: 2022-07-11
 * @Description: 获取分区工具类
 * @Version: 1.0
 */
public class FlinkKeyUtils {

    public static String getKey(Integer parallelism,String keyByValue){
        int abs = Math.abs(keyByValue.hashCode()) % parallelism;
        return abs+":"+keyByValue;
    }

}
